package com.service.impl;

import com.mapper.CgsupplyrelationMapper;
import com.pojo.Cgsupplyrelation;
import com.service.CgsupplyrelationService;
import com.util.Pager;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@Service("cgsupplyrelation")
public class CgsupplyrelationServiceImpl implements CgsupplyrelationService {
    @Resource
    private CgsupplyrelationMapper cgsupplyrelationMapper;
    @Override
    public Pager<Cgsupplyrelation> searchByCgsupplyrelation(Pager<Cgsupplyrelation> pager) {
        pager.setRows(cgsupplyrelationMapper.searchByCgsupplyrelationPager(pager));
        pager.setTotal(cgsupplyrelationMapper.total(pager));
        return pager;
    }

    @Override
    public int update(Cgsupplyrelation cgsupplyrelation) {
        return cgsupplyrelationMapper.update(cgsupplyrelation);
    }

}
